import React from "react";
import ReactDOM from "react-dom/client";

import App from "./D04creatRef";
// 把app的跟组件渲染到id为root的节点上

// const root = ReactDOM.createRoot(document.getElementById("root"));
// root.render(<App />);
const root = ReactDOM.createRoot(document.getElementById("root"));
// componentDidMount 在开发模式下使用 StrictMode 时可能会被调用两次，这是 React 的预期行为。
// root.render(
//     <React.StrictMode>
//         <App/>
//     </React.StrictMode>
// );
root.render(<DevSupport ComponentPreviews={ComponentPreviews}
                        useInitialHook={useInitial}
>
    <App/>
</DevSupport>);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
